import request from '@/utils/request'
import { transFormValue, transformData } from '@/utils/tools'

//取消报告
export function reportCancel(data) {
  return request({
    url: '/report/cancel' + transFormValue(data),
    method: 'post'
  })
}
//创建报告
export function reportCreate(data) {
  return request({
    url: '/report/create' + transFormValue(data),
    method: 'post'
  })
}

//从询价创建报告
export function reportCreateFromInquiry(data) {
  return request({
    url: '/report/createFromInquiry' + transFormValue(data),
    method: 'post'
  })
}

//删除报告
export function reportDelete(data) {
  return request({
    url: '/report/delete' + transFormValue(data),
    method: 'post'
  })
}

//导出报告
export function reportExport(data) {
  return request({
    url: '/report/export' + transFormValue(data),
    method: 'post'
  })
}

//生成报告编码
export function reportGenerateCode(data) {
  return request({
    url: '/report/generateCode' + transFormValue(data),
    method: 'post'
  })
}

//生成报告数据附件
export function reportGenerateFileByReportDataTemplate(data) {
  return request({
    url: '/report/generateFileByReportDataTemplate' + transFormValue(data),
    method: 'post'
  })
}

//生成报告文档附件
export function reportGenerateFileByReportDocTemplate(data) {
  return request({
    url: '/report/generateFileByReportDocTemplate' + transFormValue(data),
    method: 'post'
  })
}

//生成评估对象数据附件
export function reportGenerateFileBySubjectDataTemplate(data) {
  return request({
    url: '/report/generateFileBySubjectDataTemplate' + transFormValue(data),
    method: 'post'
  })
}

//获取导出的可选字段
export function reportGetExportFieldOptions(data) {
  return request({
    url: '/report/getExportFieldOptions' + transFormValue(data),
    method: 'post'
  })
}


//报告列表
export function reportGetList(data) {
  return request({
    url: '/report/getList' + transFormValue(data),
    method: 'post'
  })
}

//报告详情
export function reportInfo(data) {
  return request({
    url: '/report/info' + transFormValue(data),
    method: 'post'
  })
}


//提交报告
export function reportSubmit(data) {
  return request({
    url: '/report/submit' + transFormValue(data),
    method: 'post'
  })
}

//完成查勘
export function reportSurvey(data) {
  return request({
    url: '/report/survey' + transFormValue(data),
    method: 'post'
  })
}

//报告更新
export function reportUpdate(data) {
  return request({
    url: '/report/update' + transFormValue(data),
    method: 'post'
  })
}

//完成撰写
export function reportWrite(data) {
  return request({
    url: '/report/write' + transFormValue(data),
    method: 'post'
  })
}